<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
    <title>tabulation</title>
    <script src="xedit.js"></script>
</head>
<body>
    dfgsdfgsdfgsdfgsdfgsdfgsd
    <textarea id="warea" cols="100" rows="15"></textarea>
    <script>
    var txt = document.getElementById("warea");
    window.onload = function () {
        xedit.bind(txt, function onSave(el)
        {
            alert(el.value);
        });
    }
    
    function f()
    {
        var range = window.getSelection().getRangeAt(0);
        range.deleteContents();
        range.insertNode(document.createTextNode("hello"));

        txt.focus();
    }
    </script>
    <input type="button" value="button" onclick="f()" />
</body>
</html>
